//
//  CollectionCellMin.m
//  礼物说
//
//  Created by shmily on 15/8/17.
//  Copyright (c) 2015年 shmilyAshen. All rights reserved.
//

#import "CollectionCellMin.h"

@implementation CollectionCellMin

/** 重写 setter 方法 */
- (void)setModel:(CollectionItemsModel *)model {

}

- (void)awakeFromNib {
    ///  添加喜欢按钮
    CollectionLiked *liked = [[[NSBundle mainBundle]loadNibNamed:@"CollectionLiked" owner:self options:nil] lastObject];
    [self addSubview:liked];
    
    [self addConstraint:[NSLayoutConstraint constraintWithItem:liked attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:self attribute:NSLayoutAttributeRight multiplier:1.0 constant:-5]];
    [self addConstraint:[NSLayoutConstraint constraintWithItem:liked attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:self attribute:NSLayoutAttributeTop multiplier:1.0 constant:5]];
    [self addConstraint:[NSLayoutConstraint constraintWithItem:liked attribute:NSLayoutAttributeWidth relatedBy:NSLayoutRelationEqual toItem:self attribute:NSLayoutAttributeNotAnAttribute multiplier:1.0 constant:75]];
    [self addConstraint:[NSLayoutConstraint constraintWithItem:liked attribute:NSLayoutAttributeWidth relatedBy:NSLayoutRelationEqual toItem:self attribute:NSLayoutAttributeNotAnAttribute multiplier:1.0 constant:34]];
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
